L1=[]
for x in xrange(20001,40001):
  n = 0
for y in xrange(1,x+1):
  if x % y == 0:
   n = n + 1
 if n == 2:
      print x
 L1.append(x)
      print (sum(L1))
